package com.sc.nft.entity.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @author 刘国航
 * @desc
 * @since 2024/10/28 10:44
 */
@Data
public class TradingPoolCreateConfRpcDTO implements Serializable {
    private static final long serialVersionUID = 7643658969517809088L;

    @ApiModelProperty("品牌id")
    @NotNull(message = "品牌id不能为空")
    private Long daoId;

    @ApiModelProperty("藏品id")
    @NotNull(message = "藏品id不能为空")
    private Long collectionId;

    @ApiModelProperty("交易池名称")
    @NotBlank(message = "交易池名称不能为空")
    private String name;

    @ApiModelProperty(value = "开始时间")
    @NotNull(message = "开始时间不能为空")
    @JsonFormat(timezone = "GMT+8", pattern = "HH:mm:ss")
    private Date startTime;

    @ApiModelProperty(value = "结束时间")
    @NotNull(message = "结束时间不能为空")
    @JsonFormat(timezone = "GMT+8", pattern = "HH:mm:ss")
    private Date endTime;

    @ApiModelProperty("初始资金")
    @NotNull(message = "初始资金不能为空")
    @DecimalMin(value = "0.00", inclusive = false, message = "初始资金必须大于0")
    private BigDecimal currentAmount;

    @ApiModelProperty("初始库存")
    @NotNull(message = "初始库存不能为空")
    @Min(value = 1, message = "初始库存必须大于0")
    private Integer currentStock;

    @ApiModelProperty("最大涨幅百分比")
    @NotNull(message = "最大涨幅百分比不能为空")
    @DecimalMin(value = "0.00", message = "最大涨幅百分比不能小于0")
    @DecimalMax(value = "100.00", message = "最大涨幅百分比不能大于100%")
    private BigDecimal maxIncreasePercentage;

    @ApiModelProperty("最大跌幅百分比")
    @NotNull(message = "最大跌幅百分比不能为空")
    @DecimalMin(value = "0.00", message = "最大跌幅百分比不能小于0")
    @DecimalMax(value = "100.00", message = "最大跌幅百分比不能大于100%")
    private BigDecimal maxDecreasePercentage;

    @ApiModelProperty("最大价格")
    @NotNull(message = "最大价格不能为空")
    @DecimalMin(value = "0.00", message = "价格区间不能小于0")
    private BigDecimal maxPrice;

    @ApiModelProperty("最小价格")
    @NotNull(message = "最小价格不能为空")
    @DecimalMin(value = "0.00", message = "价格区间不能小于0")
    private BigDecimal minPrice;

    @ApiModelProperty("手续费率")
    @NotNull(message = "手续费率不能为空")
    @DecimalMin(value = "0.00", message = "手续费率不能小于0")
    @DecimalMax(value = "100.00", message = "手续费率不能大于100%")
    private BigDecimal feeRate;

    @ApiModelProperty("上链费")
    @NotNull(message = "上链费不能为空")
    @DecimalMin(value = "0.00", message = "上链费不能小于0")
    private BigDecimal gas;

    @ApiModelProperty("活动规则")
    @NotNull(message = "活动规则不能为空")
    private String activityRule;

}
